<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <title>业主管理</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <link rel="stylesheet" href="../css/admin.css">
    <link rel="stylesheet" href="../css/organzition.css">
    <link rel="stylesheet" href="../fonts/iconfont.css">
</head>
<body>
<div class="container">
    <!-- 左边选项栏 -->
    <div class="org-floor">
        <ul id="navtree"> </ul>
    </div>
    <!---->
    <div class="section-right">
        <div class="right-top">
            <!-- 搜索栏 -->
            <div class="org-search"  name="myform">
                <input type="text"   name="name" id="user_phone" value="" placeholder="按手机号搜索" onfocus="this.style.color='#888';" onblur="this.style.color='#EF7632'; "  style="font-size:12px;"/>
                <div id="search" style="cursor: pointer;"><i class="layui-icon" style="font-size: 25px; color: #EF7632;">&#xe615;</i> </div>
            </div>
           <input type="button" onclick="outerData()"  class="layui-btn-outer" lay-submit=""  value="导出本次查询数据">
            <button class="layui-btn layui-btn-normal  left-3  file"><span class="pic-3 iconfont icon-piliangdaoru"></span>批量导入单元</button>
            <button class="layui-btn layui-btn-normal  add right fix"><span class="pic-4 iconfont icon-modify"></span>修改</button>
        </div>
        <!--   table -->
        <table class="layui-table" lay-skin="line" id="table">
            <thead>
            <tr>
                <th></th>
                <th>楼&nbsp;&nbsp;层 </th>
                <th>门&nbsp;牌&nbsp;号 </th>
                <th>用户账号</th>
                <th>账户余额</th>
                <th>账单明细</th>
                <th>乘梯记录</th>
            </tr>
            </thead>
            <tbody class="org-table">
            </tbody>
        </table>
        <div id="page-fen">
            <div id="page-num"></div>
        </div>
    </div>
</div>
</body>
<script src="../lib/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="../layui/layui.js"></script>
<script src="../lib/js/jquery.cookie.js" type="text/javascript"></script>
<script>

    layui.use(['jquery','form','laypage','layer','tree'], function(){
        var $ = layui.jquery;
        var laypage = layui.laypage;

        var name=$("#name").val();
        var user_tel="";
        var user_id =localStorage.getItem("user_id");
            console.log(user_id);
        var params = {};

        $("#search").off("click").on("click",function(){
            user_tel = $.trim($("#user_phone").val());
            searchTable();
        })
//回车搜索
        $("#user_phone").on('keydown', function(e){
            if(e.keyCode == 13){
                user_tel = $.trim($("#user_phone").val());
                searchTable();
            }
        });

//批量导入单元
        unitAdd();
        function unitAdd(building_id){
            $(".left-3").off("click").on("click",  function() {
                if(building_id){
                    layer.open({
                        type:2
                        ,shade:[0.1, '#fff']
                        ,area:['345px', '230px']
                        ,title:['批量导入单元','font-weight:600;text-align:center;font-size:16px;border-radius:10px;']
                        ,content: 'add-unit_s.html',
                        success: function(layero, index){
                        }
                    });
                }else{
                    alert("请先选中小区");
                }
            })
        };

        xiugai();
        function xiugai(currentData){

            $(document).off("click", ".add").on("click", ".add", function() {
                if(currentData){
                    layer.open({
                        type:2
                        ,shade:[0.1, '#fff']
                        ,area:['355px', '300px']
                        ,title:['修改信息','font-weight:600;text-align:center;font-size:16px;border-radius:10px;']
                        ,content: 'fix.html',
                        success: function(layero, index){
                            var body = layer.getChildFrame('body', index);
                            body.contents().find("#loucen").val(currentData.loucen);
                            body.contents().find("#menpaihao").val(currentData.menpaihao);
                            body.contents().find("#user_tel").val(currentData.user_tel);
                            body.contents().find("#balance").val(currentData.balance);
                        }
                    })
                }else{
                    alert("请先选中一条数据");
                }
            })
        };

        var pages = {};
        searchTable();
        function searchTable(curr){
            var tableData;
            $.ajax({
                url: '../../organization_manage/queryUserByTelAndWuyeId',
                type: 'get',
                dataType: 'json',
                data:{
                    wuye_id :user_id,
                    user_tel:user_tel,
                    current_page:curr || 1,
                    limit:10,
                    type:0
                }
            })// ajax
                .done(function(response){

                    if(response.resultCode == 200){
                        var str= '';

                        if(response.page.list.length){
                            tableData = response.page.list;

                            for(var i=0;i<response.page.list.length;i++){
                                str +=
                                    '<tr data-id="'+ response.page.list[i].user_id +'">'+
                                    '<td class="check"><input data-id="'+response.page.list[i].user_id +'"  type="radio" name="items" title="" lay-skin="primary"></td>'+
                                    '<td>'+ response.page.list[i].loucen +'</td>'+
                                    '<td>'+ response.page.list[i].menpaihao +'</td>'+
                                    '<td>'+ response.page.list[i].user_tel+'</td>'+
                                    '<td>'+ response.page.list[i].balance+'</td>'+
                                    '<td class="org-detail"  id="detailId"><a href="./org-detail.html" data-id="'+response.page.list[i].user_id +'">查看明细&nbsp;></a></td>'+
                                    '<td class="org-record" id="recordId"><a href="./org-record.html" data-id="'+response.page.list[i].user_id+'">乘梯记录&nbsp;></a></td>'+
                                    '</tr>'
                            }
                            $(".org-table").html(str);

                            $(".org-detail a").click(function(){
                                var table_Ida= $(this).data("id");
                                localStorage.setItem("table_Ida", table_Ida);
                            });
                            $(".org-record a").click(function(){
                                var table_Idb= $(this).data("id");
                                localStorage.setItem("table_Idb", table_Idb);
                            });
                            $("#table>tbody>tr>td>input").change(function(){
                                if($(this).is(':checked')){
                                    var currentId = $(this).attr("data-id");

                                    for(var i=0;i<tableData.length;i++){
                                        if(tableData[i].user_id == currentId){
                                            var currentData = tableData[i];
                                            localStorage.setItem("userId", currentData.user_id);
                                            localStorage.setItem("danyuan_id", currentData.danyuan_id);
                                        }
                                    }
                                }else{
                                    var currentId = '';
                                }
                                xiugai(currentData);
                            });
//分页显示
                            pages.total = response.page.total;
                            console.log(pages.total);

                            pages.current_page = response.page.current_page;
                            console.log(pages.current_page);

                            pages.totalPages = Math.ceil(pages.total/10);

                            laypage({
                                cont: 'page-num'
                                ,pages: pages.totalPages
                                ,curr: pages.current_page
                                ,first: 1
                                ,last:false
                                ,prev: '<em><</em>'
                                ,next: '<em>></em>'
                                ,jump: function(obj, first){
                                    var curr = obj.curr;
                                    console.log(curr);
                                    if(!first){
                                        searchTable(curr);
                                    };
                                }
                            })//分页
                        }else{
                            str = '<tr><td colspan="7">暂无数据</td></tr>';
                            $(".org-table").html(str);
                        }
                    }//200
                })//done
                .fail(function(response){
                    console.log("fail",response);
                })//fail
        };// seach

//左侧导航栏部分
                        dysou();
                        function dysou(){
                            $.ajax({
                                url:'../../organization_manage/getProvinceByWuyeId',
                                type: 'GET',
                                dataType: "json",
                                data:{
                                    wuye_id: user_id
                                }
                            })
                                .done(function(response){
                                    console.log(response);

                                    if(response.resultCode==200){
                                        var  data = response.provinces;
                                        console.log(data);

                                        layui.tree({
                                            elem: '#navtree',
                                            skin: 'as',
                                            drag: true,
                                            click: function(id) {

                                     var attR =["province_id","city_id","district_id","building_id","danyuan_id","id"];
                                     var attr = [];
                                      for(var k in id) {
                                          attr.push(k);
                                       }
                                        for(var j=0;j<attR.length; j++){
                                                for(var m=0;m<attr.length;m++){
                                                    if(attR[j] == attr[m]){
                                                        var typeName = attr[m];
                                                        localStorage.setItem("typeName",typeName);
                                                if(typeName == "province_id"){
                                                    var province_id = id.province_id;
                                                    params.province_id = province_id;
                                                    localStorage.setItem("provinceId",province_id);
                                                    console.log(province_id);
                                                    getByprovince();

                                                }else if(typeName == "city_id"){
                                                    var city_id = id.city_id;
                                                    params.city_id = city_id;
                                                    localStorage.setItem("cityId",city_id);
                                                    console.log(city_id);
                                                    getBycity();

                                                }else if(typeName == "district_id"){
                                                    var district_id = id.district_id;
                                                    params.district_id = district_id;
                                                    localStorage.setItem("districtId",district_id);
                                                    console.log(district_id);
                                                    getBydistrict();

                                                }else if(typeName == "building_id"){
                                                    var building_id = id.building_id;
                                                    params.building_id = building_id;
                                                    localStorage.setItem("buildingId",building_id);
                                                    console.log(building_id);
                                                    getBybuilding();
                                                    unitAdd(building_id);

                                                }else if(typeName == "id"){
                                                    var danyuan_id = id.id;
                                                    params.danyuan_id = danyuan_id;
                                                    localStorage.setItem("danyuanId",danyuan_id);
                                                    console.log(danyuan_id);
                                                    getBydanyuan();
                                                }
                                         //id赋值判断
                                                    }//if
                                                }//for
                                        }//for
                         $("body").on("mousedown",".layui-tree a cite",function(){
                             $(".layui-tree a cite").css('color','#2C283C')
                             $(this).css('color','#FABB42')
                         });
    //依据省id查
                          function getByprovince(currp){
                            $.ajax({
                                url: '../../organization_manage/queryUserByProvinceId',
                                type: 'GET',
                                dataType: 'json',
                                data:{
                                    province_id:params.province_id,
                                    wuye_id:user_id,
                                    current_page:currp||1,
                                    limit:10,
                                    type:0
                                }
                            })
                                .done(function(response) {
                                    console.log("success",response);

                                    if(response.resultCode == '200'){
                                        console.log('queryUserByprovinceId');
                                        var str= '';
                                        console.log(response.page.list.length);

                                        if(response.page.list.length){
                                            tableData = response.page.list;
                                            console.log(tableData);
                                            for(var i=0;i<response.page.list.length;i++){
                                                str +=
                                                    '<tr data-id="'+ response.page.list[i].user_id +'">'+
                                                    '<td class="check"><input data-id="'+response.page.list[i].user_id +'"  type="radio" name="items" title="" lay-skin="primary"></td>'+
                                                    '<td>'+ response.page.list[i].loucen +'</td>'+
                                                    '<td>'+ response.page.list[i].menpaihao +'</td>'+
                                                    '<td>'+ response.page.list[i].user_tel+'</td>'+
                                                    '<td>'+ response.page.list[i].balance+'</td>'+
                                                    '<td class="org-detail"  id="detailId"  data-id="'+response.page.list[i].user_id +'"><a href="./org-detail.html">查看明细&nbsp;></a></td>'+
                                                    '<td class="org-record" data-id="'+response.page.list[i].user_id+'"><a href="./org-record.html">乘梯记录&nbsp;></a></td>'+
                                                    '</tr>'
                                            }
                                            $(".org-table").html(str);
//分页显示
                                            show();
                                            pages.total = response.page.total;
                                            localStorage.setItem("total",response.page.total);

                                            pages.current_page = response.page.current_page;

                                            pages.totalPages = Math.ceil(pages.total/10);
                                        /*  if(pages.total >10){*/
                                            laypage({
                                                cont: 'page-num'
                                                ,pages: pages.totalPages
                                                ,curr: pages.current_page
                                                ,first: 1
                                                ,last:false
                                                ,prev: '<em><</em>'
                                                ,next: '<em>></em>'
                                                ,jump: function(obj, first){
                                                    var currp = obj.curr;
                                                    console.log(currp);
                                                    localStorage.setItem("currp",currp);
                                                    if(!first){
                                                        getByprovince(currp);
                                                    }
                                                }
                                            })
                                        /*  }*/
                                        }
                                        else{
                                            str = '<tr><td colspan="7">暂无数据</td></tr>';
                                            $(".org-table").html(str);
                                            hidden();
                                        }//else
                                    }//200
                                })//done
                                .fail(function(response){
                                    console.log("fail",response);
                                    if(resultCode='001'){
                                        console.log("param is not found");
                                    }else if(resultCode='009'){
                                        console.log("String is not int type");
                                    }
                                });//fail
                        }
     //依据市 id查询

                            function getBycity(currc){
                                $.ajax({
                                    url: '../../organization_manage/queryUserByCityId',
                                    type: 'GET',
                                    dataType: 'json',
                                    data:{
                                        city_id:params.city_id,
                                        wuye_id:user_id,
                                        current_page:currc || 1,
                                        limit:10,
                                        type:0
                                    }
                                })
                                    .done(function(response) {
                                        console.log('success',response);
                                        if(response.resultCode == '200'){
                                            var str= '';

                                            if(response.page.list.length){
                                                tableData = response.page.list;

                                                for(var i=0;i<response.page.list.length;i++){
                                                    str +=
                                                        '<tr data-id="'+ response.page.list[i].user_id +'">'+
                                                        '<td class="check"><input data-id="'+response.page.list[i].user_id +'"  type="radio" name="items" title="" lay-skin="primary"></td>'+
                                                        '<td>'+ response.page.list[i].loucen +'</td>'+
                                                        '<td>'+ response.page.list[i].menpaihao +'</td>'+
                                                        '<td>'+ response.page.list[i].user_tel+'</td>'+
                                                        '<td>'+ response.page.list[i].balance+'</td>'+
                                                        '<td class="org-detail"  id="detailId"  data-id="'+response.page.list[i].user_id +'"><a href="./org-detail.html">查看明细&nbsp;></a></td>'+
                                                        '<td class="org-record" data-id="'+response.page.list[i].user_id+'"><a href="org-record.html">乘梯记录&nbsp;></a></td>'+
                                                        '</tr>'
                                                }
                                                $(".org-table").html(str);
//分页显示
                                                show();
                                                pages.total = response.page.total;
                                                localStorage.setItem("total",response.page.total);

                                                pages.current_page = response.page.current_page;
                                                pages.totalPages = Math.ceil(pages.total/10);

                                                laypage({
                                                    cont: 'page-num'
                                                    ,pages: pages.totalPages
                                                    ,curr: pages.current_page
                                                    ,first: 1
                                                    ,last:false
                                                    ,prev: '<em><</em>'
                                                    ,next: '<em>></em>'
                                                    ,jump: function(obj, first){
                                                        var currc = obj.curr;
                                                        console.log(currc);
                                                        localStorage.setItem("currc",currc);
                                                        if(!first){
                                                            getBycity(currc);
                                                        }
                                                    }
                                                })
                                            }
                                            else{
                                                str = '<tr><td colspan="7">暂无数据</td></tr>';
                                                $(".org-table").html(str);
                                               hidden();
                                            }//else
                                        }//200
                                    })//done
                                    .fail(function(response){
                                        console.log("fail",response);
                                        if(resultCode='001'){
                                            console.log("param is not found");
                                        }else if(resultCode='009'){
                                            console.log("String is not int type");
                                        }
                                    });//fail
                            }
    //依据区 id查询

                            function getBydistrict(currdi){
                                $.ajax({
                                    url: '../../organization_manage/queryUserByDistrictId',
                                    type: 'GET',
                                    dataType: 'json',
                                    data:{
                                        district_id:params.district_id,
                                        wuye_id:user_id,
                                        current_page:currdi || 1,
                                        limit:10,
                                        type:0
                                    }
                                })
                                    .done(function(response) {
                                        console.log("success",response);

                                        if(response.resultCode == '200'){
                                            var str= '';
                                            console.log(response.page.list.length);

                                            if(response.page.list.length){
                                                tableData = response.page.list;

                                                for(var i=0;i<response.page.list.length;i++){
                                                    str +=
                                                        '<tr data-id="'+ response.page.list[i].user_id +'">'+
                                                        '<td class="check"><input data-id="'+response.page.list[i].user_id +'"  type="radio" name="items" title="" lay-skin="primary"></td>'+
                                                        '<td>'+ response.page.list[i].loucen +'</td>'+
                                                        '<td>'+ response.page.list[i].menpaihao +'</td>'+
                                                        '<td>'+ response.page.list[i].user_tel+'</td>'+
                                                        '<td>'+ response.page.list[i].balance+'</td>'+
                                                        '<td class="org-detail"  id="detailId"  data-id="'+response.page.list[i].user_id +'"><a href="./org-detail.html">查看明细&nbsp;></a></td>'+
                                                        '<td class="org-record" data-id="'+response.page.list[i].user_id+'"><a href="org-record.html">乘梯记录&nbsp;></a></td>'+
                                                        '</tr>'
                                                }
                                                $(".org-table").html(str);
//分页显示
                                                show();
                                                pages.total = response.page.total;
                                                localStorage.setItem("total",response.page.total);

                                                pages.current_page = response.page.current_page;
                                                pages.totalPages = Math.ceil(pages.total/10);

                                                laypage({
                                                    cont: 'page-num'
                                                    ,pages: pages.totalPages
                                                    ,curr: pages.current_page
                                                    ,first: 1
                                                    ,last:false
                                                    ,prev: '<em><</em>'
                                                    ,next: '<em>></em>'
                                                    ,jump: function(obj, first){
                                                        var currdi = obj.curr;
                                                        console.log(currdi);
                                                        localStorage.setItem("currdi",currdi);
                                                        if(!first){
                                                            getBydistrict(currdi);
                                                        }
                                                    }
                                                })
                                            }
                                            else{
                                                str = '<tr><td colspan="7">暂无数据</td></tr>';
                                                $(".org-table").html(str);
                                                hidden();

                                            }//else
                                        }//200
                                    })//done
                                    .fail(function(response){
                                        console.log("fail",response);
                                        if(resultCode='001'){
                                            console.log("param is not found");
                                        }else if(resultCode='009'){
                                            console.log("String is not int type");
                                        }
                                    });//fail
                            }
    //依据小区id查询

                        function getBybuilding(currb){
                            $.ajax({
                                url: '../../organization_manage/queryUserByBuildingId',
                                type: 'GET',
                                dataType: 'json',
                                data:{
                                    building_id:params.building_id,
                                    current_page:currb || 1,
                                    limit:10,
                                    type:0
                                }
                            })
                                .done(function(response) {
                                    console.log("success",response);

                                    if(response.resultCode == '200'){
                                        var str= '';
                                        console.log(response.page.list.length);

                                        if(response.page.list.length){
                                            tableData = response.page.list;

                                            for(var i=0;i<response.page.list.length;i++){
                                                str +=
                                                    '<tr data-id="'+ response.page.list[i].user_id +'">'+
                                                    '<td class="check"><input data-id="'+response.page.list[i].user_id +'"  type="radio" name="items" title="" lay-skin="primary"></td>'+
                                                    '<td>'+ response.page.list[i].loucen +'</td>'+
                                                    '<td>'+ response.page.list[i].menpaihao +'</td>'+
                                                    '<td>'+ response.page.list[i].user_tel+'</td>'+
                                                    '<td>'+ response.page.list[i].balance+'</td>'+
                                                    '<td class="org-detail"  id="detailId"  data-id="'+response.page.list[i].user_id +'"><a href="./org-detail.html">查看明细&nbsp;></a></td>'+
                                                    '<td class="org-record" data-id="'+response.page.list[i].user_id+'"><a href="org-record.html">乘梯记录&nbsp;></a></td>'+
                                                    '</tr>'
                                            }
                                            $(".org-table").html(str);
                        //分页显示
                                            pages.total = response.page.total;
                                            localStorage.setItem("total",response.page.total);

/*                                            if(pages.total == "0" ){
                                                $('.layui-btn-outer').attr("disabled",true);
                                            }else{
                                                $('.layui-btn-outer').attr("disabled",false);
                                            };*/

                                            pages.current_page = response.page.current_page;
                                            pages.totalPages = Math.ceil(pages.total/10);
                                            show();
                                            laypage({
                                                cont: 'page-num'
                                                ,pages: pages.totalPages
                                                ,curr: pages.current_page
                                                ,first: 1
                                                ,last:false
                                                ,prev: '<em><</em>'
                                                ,next: '<em>></em>'
                                                ,jump: function(obj, first){ //触发分页后的回调
                                                    var currb = obj.curr;
                                                    console.log(currb);
                                                    localStorage.setItem("currb",currb);
                                                    if(!first){ //点击跳页触发函数自身，并传递当前页：obj.curr
                                                        getBybuilding(currb);
                                                    }
                                                }
                                            });

                                        }else{
                                            str = '<tr><td colspan="7">暂无数据</td></tr>';
                                            $(".org-table").html(str);
                                            hidden();
                                        }//else
                                    }//200
                                })//done
                                .fail(function(response){
                                    console.log("fail",response);
                                    if(resultCode='001'){
                                        console.log("param is not found");
                                    }else if(resultCode='009'){
                                        console.log("String is not int type");
                                    }
                                });//fail
                        }
  //依据单元i//查询

                        function getBydanyuan(currd){
                            $.ajax({
                                url: '../../organization_manage/queryUserByDanyuanId',
                                type: 'GET',
                                dataType: 'json',
                                data:{
                                    danyuan_id:params.danyuan_id,
                                    current_page:currd || 1,
                                    limit:10,
                                    type:0
                                }
                            })
                                .done(function(response) {
                                    console.log("success",response);

                                    if(response.resultCode == 200){

                                        var str= '';

                                        if(response.page.list.length){
                                            tableData = response.page.list;

                                            for(var i=0;i<response.page.list.length;i++){
                                                str +=
                                                    '<tr data-id="'+ response.page.list[i].user_id +'">'+
                                                    '<td class="check"><input data-id="'+response.page.list[i].user_id +'"  type="radio" name="items" title="" lay-skin="primary"></td>'+
                                                    '<td>'+ response.page.list[i].loucen +'</td>'+
                                                    '<td>'+ response.page.list[i].menpaihao +'</td>'+
                                                    '<td>'+ response.page.list[i].user_tel+'</td>'+
                                                    '<td>'+ response.page.list[i].balance+'</td>'+
                                                    '<td class="org-detail"  id="detailId"  data-id="'+response.page.list[i].user_id +'"><a href="./org-detail.html">查看明细&nbsp;></a></td>'+
                                                    '<td class="org-record" data-id="'+response.page.list[i].user_id+'"><a href="org-record.html">乘梯记录&nbsp;></a></td>'+
                                                    '</tr>'
                                            }
                                            $(".org-table").html(str);
                        //分页显示
                                            show();
                                            pages.total = response.page.total;
                                            console.log(pages.total);

                                            localStorage.setItem("total",response.page.total);

                                            pages.current_page = response.page.current_page;

                                            pages.totalPages = Math.ceil(pages.total/10);

                                            laypage({
                                                cont: 'page-num'
                                                ,pages: pages.totalPages
                                                ,curr: pages.current_page
                                                ,first: 1
                                                ,last:false
                                                ,prev: '<em><</em>'
                                                ,next: '<em>></em>'
                                                ,jump: function(obj, first){ //触发分页后的回调
                                                    var currd = obj.curr;
                                                    localStorage.setItem("currd",currd);
                                                    if(!first){ //点击跳页触发函数自身，并传递当前页：obj.curr
                                                        getBydanyuan(currd);
                                                    }
                                                }
                                            })
                                        }
                                        else{
                                            str = '<tr><td colspan="7">暂无数据</td></tr>';
                                            $(".org-table").html(str);
                                            hidden();

                                        }//else
                                    }//200
                                })//done
                                .fail(function(response){
                                    console.log("fail",response);
                                    if(resultCode='001'){
                                        console.log("param is not found");
                                    }else if(resultCode='009'){
                                        console.log("String is not int type");
                                    }
                                });//fail
                        }
                             function show(){
                                 document.getElementById("page-fen").style.display="";
                             };
                             function hidden(){
                                 document.getElementById("page-fen").style.display="none";
                             };

                            },//click
                            onchange: function (){
                                console.log(this);
                            },
                            nodes: data
                        })//tree
                    }//200
                })//done
                .fail(function(response){
                    console.log("fail",response);
                })
             }
    });//模块加载、

    // 超链接导出当前查询数据
    function outerData(){

        var user_id =localStorage.getItem("user_id");
            console.log(user_id);

        var province_id=localStorage.getItem("provinceId");
        var city_id=localStorage.getItem("cityId");
        var district_id=localStorage.getItem("districtId");
        var building_id=localStorage.getItem("buildingId");
        var danyuan_id=localStorage.getItem("danyuanId");
        var typeName=localStorage.getItem("typeName");
            console.log(typeName);
        var currp=localStorage.getItem("currp");
        var currc=localStorage.getItem("currc");
        var currdi=localStorage.getItem("currdi");
        var currb=localStorage.getItem("currb");
        var currd=localStorage.getItem("currd");


        if(typeName == "province_id"){

                window.location.href='http://wrench-tida.tunnel.echomod.cn/organization_manage/queryUserByProvinceId?wuye_id='+user_id+'&province_id='+province_id+'&current_page='+currp+'&limit=10&type=1'
                return;
        }else if(typeName == "city_id"){

                window.location.href = 'http://wrench-tida.tunnel.echomod.cn/organization_manage/queryUserByCityId?wuye_id=' + user_id + '&city_id=' + city_id + '&current_page=' + currc + '&limit=10&type=1'
                return;
        }else if(typeName == "district_id"){

                window.location.href='http://wrench-tida.tunnel.echomod.cn/organization_manage/queryUserByDistrictId?wuye_id='+user_id+'&district_id='+district_id+'&current_page='+currdi+'&limit=10&type=1'
                return;
        }else if(typeName == "building_id"){

                window.location.href = 'http://wrench-tida.tunnel.echomod.cn/organization_manage/queryUserByBuildingId?wuye_id=' + user_id + '&building_id=' + building_id + '&current_page=' + currb + '&limit=10&type=1'
                return;
        }else if(typeName == "id"){

                window.location.href='http://wrench-tida.tunnel.echomod.cn/organization_manage/queryUserByDanyuanId?wuye_id='+user_id+'&danyuan_id='+danyuan_id+'&current_page='+currd+'&limit=10&type=1'
                return;
        }

    };
</script>

</html>
